<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Node extends CI_Controller {

	function __construct()
	 {	  
		parent::__construct();
		$this->load->helper('url');
	 }
	 
	 private function htmlstr_loginbar(){
		$data=array();
		$this->load->library('tank_auth');
		$this->lang->load('tank_auth');
		if ($this->tank_auth->is_logged_in()){
			$data['login_username']=$this->tank_auth->get_username();
		}else{
			$data['login_username']='';
		}
		$htmlstr=$this->load->view('htmlpage/loginbar',$data,true);
		return $htmlstr;
	}
	private function get_share_pagedata(){
//		$pagedata['head']=$this->load->view('htmlpage/head','',true);
//		$pagedata['logobar']=$this->load->view('htmlpage/logobar','',true);
		$pagedata['loginbar']=$this->htmlstr_loginbar();
//		$pagedata['navbar']=$this->load->view('htmlpage/navbar','',true);
//		$pagedata['footbar']=$this->load->view('htmlpage/footbar','',true);
		return $pagedata;
	}

	public function index($taskid=1){
		$this->load->helper('url');
		$data = array();
		$data = $this->get_share_pagedata();
		$data['rootTaskId'] = $taskid;
		$this->load->view('node',$data);
	}

}
